<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j">
<f:view locale="#{language.locale}">
	<h:head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link rel="stylesheet" type="text/css"
			href="${facesContext.externalContext.requestContextPath}/css/style.css" />
		<title><ui:insert name="title">Car Rent Inc</ui:insert></title>
	</h:head>

	<h:body>
		<h:form>
			<h:panelGrid columns="2">
				<h1>Language :</h1>
				<h:selectOneMenu value="#{language.localeCode}" onchange="submit()"
					valueChangeListener="#{language.countryLocaleCodeChanged}">
					<f:selectItems value="#{language.countriesInMap}" />
				</h:selectOneMenu>
			</h:panelGrid>
		</h:form>


		<h:outputText value="#{msg['logged_as']} " />

		<h:outputText value="${client.getFirstName()} ${client.getLastName()}"
			styleClass="background" />
		<br />
		<h:panelGrid columns="7">
			<a4j:status onstart="#{rich:component('statPane')}.show()"
				onstop="#{rich:component('statPane')}.hide()" />
			<h:form id="main_form" styleClass="page">

				<rich:popupPanel id="statPane" autosized="true">
					<h:graphicImage value="/images/ai.gif" alt="ai" />
    	        Please wait...
	        </rich:popupPanel>

				<h:commandButton value="#{msg['manage_bills']}"
					action="/client/manage_bills?faces-redirect=false" />
				<h:commandButton value="#{msg['make_new_request']}"
					action="/client/new_request?faces-redirect=false" />
				<h:commandButton value="#{msg['closed_requests']}"
					action="/client/closed_requests?faces-redirect=false" />
				<h:commandButton value="Manage New Requests"
					action="/manager/manage_new_requests?faces-redirect=false" />
				<h:commandButton value="Manage Active Requests"
					action="/manager/manage_active_requests?faces-redirect=false" />
				<h:commandButton value="All Closed Requests"
					action="/manager/manage_closed_requests?faces-redirect=false" />
				<h:commandButton value="#{msg['logout']}" action="/client/logout" />
			</h:form>
		</h:panelGrid>


		<ui:insert name="page">
		</ui:insert>

	</h:body>
</f:view>

</html>
